home *** CD-ROM | disk | FTP | other *** search
/ Champak 128 / Vol 128 (Damaged).iso / games / rocketbi.swf / scripts / DefineSprite_371 / frame_20 / DoAction.as
Encoding:
Text File  |  2011-03-26  |  517 b   |  29 lines

  1. pos = new Array();
  2. n = 1;
  3. while(n <= 6)
  4. {
  5.    pos[n] = eval(n)._x;
  6.    n++;
  7. }
  8. this.onEnterFrame = function()
  9. {
  10.    n = 1;
  11.    while(n <= 6)
  12.    {
  13.       if(eval(n).hitTest(_root._xmouse,_root._ymouse,true))
  14.       {
  15.          eval(n)._x += Math.ceil((pos[n] + 10 - eval(n)._x) / 10);
  16.       }
  17.       else
  18.       {
  19.          eval(n)._x += Math.floor((pos[n] - eval(n)._x) / 10);
  20.       }
  21.       n++;
  22.    }
  23. };
  24. if(_root.screen == _parent.screen)
  25. {
  26.    stop();
  27.    _root.front[4].choice.gotoAndStop("back");
  28. }
  29.